#include <iostream>
#include <stdlib.h>
#include <unistd.h>
using namespace std; 

int main(){
	int a[2]={0}; 
	char buf[10]="hello"; 
	if(pipe(a)== -1)
		cout << "open pipe error\n" ; 
	else{
		close(a[0]); 
		cout << "Test1" << endl;
		int r;  
		r = write(a[1],buf,10); 
		cout << r << endl; 
	}
}
